home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 July
/
Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64
/
Binary Power 3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
35 lines
0 rem << cd43-7 >>
1 rem ==================================
2 rem commodares problem #39-3 :
3 print"[147] [194]inary [208]ower 3"
4 rem solution by
5 rem russell k prater
6 rem screen character reversal
8 rem ===== c-64 only ================
9 rem select address for character ram
10 addr=12288 : poke 252,addr/256
19 rem protect it from basic
20 poke 56,addr/256 : clr
29 rem code is relocatable; change ml
30 ml=820 : if peek(ml)<>169 then gosub 110
39 rem download and reverse rom
40 sys ml : p=peek(53272)
49 rem redirect vic chip
50 poke 53272,(p and 240)+12
59 rem press any key to restore
60 get a$ : if a$="" then 60
70 poke 53272,p
79 rem press any key to reverse
80 get a$ : if a$="" then 80
90 goto 50
100 end
110 for i=ml to ml+55:read a:ck=ck+a:poke i,a:next:if ck=7701 then return
120 print"error in data":end
130 data 169,(NULL)15,133,255,169,000,133,251
140 data 133,253,169,208,133,254,120,165
150 data 001,041,251,133,001,16(NULL),000,177
160 data 253,162,007,010,102,002,202,016
170 data 250,165,002,145,251,200,208,239
180 data 230,252,230,254,198,255,016,231
190 data 165,001,009,004,133,001,088,096